package ustc.xiaoyang.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ustc.xiaoyang.pojo.Result;
import ustc.xiaoyang.service.ReportService;

@RestController
@Slf4j
@RequestMapping("/report")
public class ReportController {
    private final ReportService reportService;
    public ReportController(ReportService reportService) {
        this.reportService = reportService;
    }
    @GetMapping("/empJobData")
    public Result getEmpJobData(){
        log.info("员工工作信息统计");
        return Result.success(reportService.getEmpJobData());
    }
    @GetMapping("/empGenderData")
    public Result getEmpGenderData(){
        log.info("员工性别信息统计");
        return Result.success(reportService.getEmpGenderData());
    }

    @GetMapping("/studentCountData")
    public Result getStudentClazzData(){
        log.info("学生班级人数信息统计");
        return Result.success(reportService.getStudentClazzData());
    }

    @GetMapping("/studentDegreeData")
    public Result getStudentDegreeData(){
        log.info("学生学历信息统计");
        return Result.success(reportService.getStudentDegreeData());
    }

}
